package dataSet;

import java.util.*;

public class Nop
{
	public int	id;

	public int getId()
	{
		return id;
	}

	public void setId(int id)
	{
		this.id = id;
	}

	public Map<Topic, Double>	topicWeightMap;

	public Map<Topic, Double> getTopicWeightMap()
	{
		if (this.topicWeightMap == null)
		{
			this.topicWeightMap = new HashMap<Topic, Double>();
		}
		return topicWeightMap;
	}

	public void setTopicWeightMap(Map<Topic, Double> topicWeightMap)
	{
		if (this.topicWeightMap == null)
		{
			this.topicWeightMap = new HashMap<Topic, Double>();
		}
		this.topicWeightMap = topicWeightMap;
	}

	public Double getTopicWeight(Topic aTopic)
	{
		if (this.topicWeightMap == null)
		{
			this.topicWeightMap = new HashMap<Topic, Double>();
		}
		Set<Topic> topicList = this.topicWeightMap.keySet();
		if (topicList.contains(aTopic))
		{
			return topicWeightMap.get(aTopic);
		}
		else
		{
			return 0.0;
		}
	}

	public void setTopicWeightMap(Topic aTopic, Double topicWeight)
	{
		if (this.topicWeightMap == null)
		{
			this.topicWeightMap = new HashMap<Topic, Double>();
		}
		this.topicWeightMap.put(aTopic, topicWeight);
	}
}
